﻿using SuperX.SuperSocket.Socket.Message;
using System;
using System.Collections.Generic;

namespace SuperX.SuperSocket.Socket.Client
{
    public interface ISocketClient
    {
        event EventHandler<MessageArgs> MessageRecevied;

        event EventHandler<SocketErrorArgs> Error;

        event EventHandler DisConnected;

        event EventHandler Connected;

        bool Connect();

        void DisConnect();

        void Send(byte[] datas, string header = null);

        void Send(string content);

        void Send(string header, string content);

        void Send<T>(T obj) where T : new();

        void Send(Dictionary<string, string> headers, string content);

        void Send(Dictionary<string, string> headers, byte[] datas);
    }
}